<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Programmable interval timer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Programmable_interval_timer"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Programmable_interval_timer rootpage-Programmable_interval_timer skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Programmable interval timer</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>In <a href="CPU" class="mw-redirect" title="CPU">computing</a> and in <a href="Embedded_system" title="Embedded system">embedded systems</a>, a <b>programmable interval timer</b> (<b>PIT</b>) is a <a href="Counter_(digital)" title="Counter (digital)">counter</a> that generates an output signal when it reaches a programmed count. The output signal may trigger an <a href="Interrupt" title="Interrupt">interrupt</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Common_features">Common features</h2></div>
<p>PITs may be one-shot or periodic. One-shot timers will signal only once and then stop counting. Periodic timers signal every time they reach a specific value and then restart, thus producing a signal at periodic intervals. Periodic timers are typically used to invoke activities that must be performed at regular intervals.
</p><p>Counters are usually programmed with fixed intervals that determine how long the counter will count before it will output a signal.
</p>
<div class="mw-heading mw-heading2"><h2 id="IBM_PC_compatible">IBM PC compatible</h2></div>
<p>The <a href="Intel_8253" title="Intel 8253">Intel 8253</a> PIT was the original timing device used on <a href="IBM_PC_compatible" title="IBM PC compatible">IBM PC compatibles</a>. It used a 1.193182 <a href="MHz" class="mw-redirect" title="MHz">MHz</a> <a href="Clock_signal" title="Clock signal">clock signal</a> (one third of the <a href="Color_burst" class="mw-redirect" title="Color burst">color burst</a> frequency used by <a href="NTSC" title="NTSC">NTSC</a>, one twelfth of the system clock <a href="Crystal_oscillator" title="Crystal oscillator">crystal oscillator</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> therefore one quarter of the 4.77 MHz CPU clock) and contains three timers. Timer 0 is used by <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a> (uniprocessor) and <a href="Linux" title="Linux">Linux</a> as a system timer, timer 1 was historically used for <a href="Dynamic_random_access_memory" class="mw-redirect" title="Dynamic random access memory">dynamic random access memory</a> refreshes and timer 2 for the <a href="PC_speaker" title="PC speaker">PC speaker</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>The <a href="LAPIC" class="mw-redirect" title="LAPIC">LAPIC</a> in newer Intel systems offers a higher-resolution (one microsecond) timer.<sup id="cite_ref-timer_3-0" class="reference"><a href="#cite_note-timer-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> This is used in preference to the PIT timer in <a href="Linux_kernel" title="Linux kernel">Linux kernels</a> starting with 2.6.18.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="High_Precision_Event_Timer" title="High Precision Event Timer">High Precision Event Timer</a></li>
<li><a href="Monostable_multivibrator" class="mw-redirect" title="Monostable multivibrator">Monostable multivibrator</a></li>
<li><a href="NE555" class="mw-redirect" title="NE555">NE555</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.osdever.net/bkerndev/Docs/pit.htm">"Bran's Kernel Development Tutorial: The Programmable Interval Timer"</a>. Osdever.net<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://wiki.osdev.org/Programmable_Interval_Timer">"Programmable Interval Timer - OSDev Wiki"</a>. Wiki.osdev.org. 2012-06-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite></span>
</li>
<li id="cite_note-timer-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-timer_3-0">^</a></b></span> <span class="reference-text">Uwe Walter, Vincent Oberle <a rel="nofollow" class="external text" href="http://telematics.tm.kit.edu/publications/Files/61/walter_ibm_linux_challenge.pdf">μ-second precision timer support for the Linux kernel</a></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005802">Determining and changing the rate of timer interrupts a guest operating system requests (1005802)</a></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://www.luxford.com/high-performance-windows-timers">High Performance Windows Timers</a></li>
<li><a rel="nofollow" class="external text" href="http://www.phatcode.net/articles.php?id=246">Timing on the PC family under DOS</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2024-09-18" href="https://en.wikipedia.org/wiki/?title=Programmable_interval_timer&oldid=1246296123">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>